﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Website._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent" Visible="True">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to Book Library!
    </h2>
    <p>
        
    </p>
    <p>
        
    </p>
    <div>
    <asp:Panel runat = "server" ID = "HeaderPanel">
        <asp:Table ID="Table1" runat = "server" style="margin-right: 21px" Width="917px" 
            Height="143px">
        <asp:TableHeaderRow ID="TableHeaderRow1" BackColor ="ButtonShadow" runat = "server"><asp:TableHeaderCell ID="TableHeaderCell1" runat = "server" ColumnSpan = "4">BOOK LIBRARY</asp:TableHeaderCell></asp:TableHeaderRow>
        <asp:TableRow ID="TableRow1" runat = "server">
        <asp:TableCell ID="TableCell1" runat = "server">Book<asp:TextBox ID="TextBox0" Width = "500" runat="server"></asp:TextBox></asp:TableCell>
         
        <asp:TableCell ID="TableCell2" runat = "server">Authors<asp:TextBox ID="TextBox1" runat="server" Width="250"></asp:TextBox></asp:TableCell>
        <asp:TableCell ID="TableCell3" runat = "server">Availability<asp:TextBox ID="TextBox2" runat="server" Width="90"></asp:TextBox></asp:TableCell>
        
        </asp:TableRow>
        <asp:TableFooterRow ID="TableFooterRow1" BackColor ="ButtonShadow" runat = "server"><asp:TableHeaderCell ID="TableHeaderCell2" runat = "server" ColumnSpan = "4">book library</asp:TableHeaderCell></asp:TableFooterRow>
        </asp:Table>
    </asp:Panel>

        <asp:GridView ID="BookGridView" runat="server" 
            CellPadding="4" ForeColor="#333333" GridLines="None" Width="912px" 
            onselectedindexchanged="BookGridView_SelectedIndexChanged" 
            onselectedindexchanging="BookGridView_SelectedIndexChanging" 
            AutoGenerateColumns="False" DataKeyNames="id" 
            AllowPaging="True" AllowSorting="True" DataSourceID="SqlDataSource1" 
            Height="253px" style="margin-left: 2px">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" 
                    ReadOnly="True" SortExpression="id" />
                <asp:BoundField DataField="Book" HeaderText="Book" 
                    SortExpression="Book" />
                <asp:BoundField DataField="Authors" HeaderText="Authors" 
                    SortExpression="Authors" />
                <asp:BoundField DataField="Availability" HeaderText="Availability" 
                    SortExpression="Availability" />
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>

    <asp:Panel runat = "server" ID = "MainPanel" ScrollBars ="Auto">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            
            
            
            SelectCommand="SELECT [id], [Book], [Authors], [Availability] FROM [Books] ORDER BY [Book], [Authors], [Availability]">
        </asp:SqlDataSource>
    </asp:Panel>
    </div>
 
</asp:Content>